package com.nami.store.dubbo;

import com.nami.store.api.request.conversation.task.ConverTaskAddReq;
import com.nami.store.api.service.RemoteConverTaskService;
import com.nami.store.api.response.task.ConverTaskDTO;
import com.nami.store.biz.convertask.application.ConverTaskAppService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;

import java.util.List;

@Slf4j
@DubboService
@RequiredArgsConstructor
public class RemoteConverTaskServiceImpl implements RemoteConverTaskService {

    private final ConverTaskAppService taskAppService;

    @Override
    public List<ConverTaskDTO> getTask(Integer pageIndex, Integer pageSize) {
        return taskAppService.getTask(pageIndex, pageSize);
    }

    @Override
    public boolean batchDel(List<Long> ids) {
        return taskAppService.batchDel(ids);
    }

    @Override
    public boolean batchSave(List<ConverTaskAddReq> batch) {
        return taskAppService.insert(batch);
    }

}
